<script setup name="App" lang="ts">
import { ref } from 'vue'

// 需求：在 h1 标签上 move，实时显示鼠标位置
const mouse = ref({
  x: 0,
  y: 0,
})

const handleMousemove = (e: MouseEvent) => {
  mouse.value.x = e.pageX
  mouse.value.y = e.pageY
}
</script>
<template>
  <div>
    <p>x: {{ mouse.x }}</p>
    <p>y: {{ mouse.y }}</p>
    <h1 @mousemove="handleMousemove">Hello Vue3 + TS</h1>
  </div>
</template>
